﻿using System;

namespace Program11
{
   


    public enum QQState
        {
            online=1,
            offline = 0,
            leavwe=2,
            busy=3,
            Qme=4
        }
            class Program
            {
        static void Main(string[] args)
        {
            //QQState state = QQState.online;
            //int n = (int)state;
            //Console.WriteLine("qq在线枚举成员的值"+n );
            //Console.WriteLine("qq离开枚举成员的值" + (int)QQState.offline);
            //Console.WriteLine("qq离开枚举成员的值" + (int)QQState.leavwe );
            //Console.WriteLine("qq忙碌枚举成员的值" + (int)QQState.busy );
            //Console.WriteLine("qq无聊枚举成员的值" + (int)QQState.Qme );


            # region 将int转换成枚举类型
            int n1 = 3;
            int n2 = 0;
            int n3 = 1;

            var state1 = (QQState)n1;
            var state2 = (QQState)n2;
            var state3 = (QQState)n3;
            Console.WriteLine("qq状态" + state1);
            Console.WriteLine("qq状态" + state2);
            Console.WriteLine("qq状态" + state2);
            #endregion 

            
        }

    }
}
